package editor.osx;

import adventure.placeable.PlaceableManager;
import adventure.placeable.PlaceableManagerEdit;
import adventure.placeable.trigger.conditions.TriggerCondition;
import adventure.placeable.trigger.TriggerEdit;
import adventure.placeable.trigger.results.TriggerResult;
import adventure.AdventureEdit;

/**
 *
 * @author Michael Hanns
 * 
 */
public class DialogAddTriggerView extends javax.swing.JDialog {

    private static final long serialVersionUID = 5775207438946634821L;
    private AdventureEdit adv;
    private PlaceableManager placeables;
    private int totalTriggers;
    private WITNAFrameView parent;
    private int destX;
    private int destY;
    private int destZ;

    /** Creates new form EditorItemView */
    public DialogAddTriggerView(java.awt.Frame parent, AdventureEdit a,
            int x, int y, int z) {
        super(parent, true);
        this.parent = (WITNAFrameView) parent;
        destX = x;
        destY = y;
        destZ = z;
        adv = a;
        placeables = (PlaceableManager) adv.getPlaceableManager();
        initComponents();
        if (placeables.getTrigger(1).getID() == 0) {
            ((PlaceableManagerEdit) placeables).newTrigger();
        }
        fillTable();
        getTriggerData(totalTriggers - 1);
    }

    public void fillTable() {
        triggerListTable.removeAll();

        int x = 1;
        while (placeables.getTrigger(x).getID() != 0) {
            triggerListTable.getModel().setValueAt(placeables.getTrigger(x).getID(), x - 1, 0);
            triggerListTable.getModel().setValueAt(placeables.getTrigger(x).getName(), x - 1, 1);
            x++;
        }

        totalTriggers = x;
        triggerListTable.changeSelection(x - 1, 2, false, false);
    }

    public void getTriggerData(int row) {
        if (row > 0) {
            TriggerEdit trigger = (TriggerEdit) placeables.getTrigger(row);

            idBox.setText("" + trigger.getID());
            nameBox.setText(trigger.getStandardName());
            triggeredNameBox.setText(trigger.getTriggeredName());
            descriptionBox.setText(trigger.getDescription());

            visibleBox.setSelected(trigger.isVisible());
            lightSourceBox.setSelected(trigger.isLightSource());

            limitedUsesCheckBox.setSelected(trigger.limitedUses());
            if (trigger.limitedUses()) {
                usesField.setText(trigger.getTotalUses() + "");
                usesField.setEnabled(true);
            } else {
                usesField.setText("0");
                usesField.setEnabled(false);
            }

            resultsList.clearSelection();

            TriggerResult[] results = trigger.getResults();

            javax.swing.DefaultListModel model = new javax.swing.DefaultListModel();
            String modelText = "";
            for (int x = 0; x < results.length; x++) {
                modelText = results[x].getDescription();
                model.addElement(modelText);
            }
            resultsList.setModel(model);

            conditionsList.setModel(new javax.swing.DefaultListModel());
        }
    }

    public void getConditionData(int result) {
        if (result > -1) {
            TriggerEdit t = ((TriggerEdit) placeables.getTrigger(Integer.parseInt(idBox.getText())));
            TriggerCondition[] conditions = t.getResults()[result].getConditions();
            javax.swing.DefaultListModel model = new javax.swing.DefaultListModel();
            String modelText = "";
            for (int x = 0; x < conditions.length; x++) {
                modelText = conditions[x].getDescription();
                model.addElement(modelText);
            }
            conditionsList.setModel(model);
        } else {
            conditionsList.setModel(new javax.swing.DefaultListModel());
        }
    }
    
    private void addTrigger() {
        int id = Integer.parseInt(idBox.getText());
        String name = nameBox.getText();


        if (id > 0 && name.length() > 0) {
            adv.getRoomManager().addTriggerToRoom(placeables.getTrigger(id), destX, destY, destZ);
            parent.getRoomDetails(destX, destY, destZ);
            parent.printToConsole("Trigger " + name + " added to room "
                    + "(" + destX + "," + destY + "," + destZ + ").");
            parent.setUnsavedChanges(true);
        } else {
            parent.printToConsole("You must specify a name for the trigger before adding to a room!");
        }
        dispose();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane2 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        itemListPane = new javax.swing.JScrollPane();
        triggerListTable = new javax.swing.JTable();
        nameBox = new javax.swing.JFormattedTextField();
        idBox = new javax.swing.JFormattedTextField();
        descriptionScrollPane = new javax.swing.JScrollPane();
        descriptionBox = new javax.swing.JTextPane();
        idLabel = new javax.swing.JLabel();
        nameLabel = new javax.swing.JLabel();
        descriptionLabel = new javax.swing.JLabel();
        separator = new javax.swing.JSeparator();
        closeButton = new javax.swing.JButton();
        triggeredNameBox = new javax.swing.JFormattedTextField();
        triggerNameLabel = new javax.swing.JLabel();
        resultsLabel = new javax.swing.JLabel();
        resultsScrollPane = new javax.swing.JScrollPane();
        resultsList = new javax.swing.JList();
        conditionsLabel = new javax.swing.JLabel();
        conditionsScrollPane = new javax.swing.JScrollPane();
        conditionsList = new javax.swing.JList();
        addButton = new javax.swing.JButton();
        limitedUsesCheckBox = new javax.swing.JCheckBox();
        usesField = new javax.swing.JFormattedTextField();
        lightSourceBox = new javax.swing.JCheckBox();
        visibleBox = new javax.swing.JCheckBox();
        usesLabel = new javax.swing.JLabel();

        jList1.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane2.setViewportView(jList1);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Add Trigger");
        setLocationByPlatform(true);
        setResizable(false);

        triggerListTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "#", "Name"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        triggerListTable.setToolTipText("Item list");
        triggerListTable.setColumnSelectionAllowed(true);
        triggerListTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                triggerListTableMouseClicked(evt);
            }
        });
        itemListPane.setViewportView(triggerListTable);
        triggerListTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        triggerListTable.getColumnModel().getColumn(0).setMinWidth(10);
        triggerListTable.getColumnModel().getColumn(0).setPreferredWidth(25);
        triggerListTable.getColumnModel().getColumn(0).setMaxWidth(25);

        nameBox.setEditable(false);
        nameBox.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        nameBox.setToolTipText("Item name");
        nameBox.setEnabled(false);

        idBox.setEditable(false);
        idBox.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        idBox.setToolTipText("Item number");

        descriptionScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

        descriptionBox.setToolTipText("Item description");
        descriptionBox.setEnabled(false);
        descriptionScrollPane.setViewportView(descriptionBox);

        idLabel.setText("ID:");

        nameLabel.setText("Name:");

        descriptionLabel.setText("Description:");

        closeButton.setText("Close");
        closeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeButtonActionPerformed(evt);
            }
        });

        triggeredNameBox.setEditable(false);
        triggeredNameBox.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        triggeredNameBox.setToolTipText("Item name");
        triggeredNameBox.setEnabled(false);

        triggerNameLabel.setText("Triggered name:");

        resultsLabel.setText("Results:");

        resultsScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

        resultsList.setBackground(new java.awt.Color(240, 240, 240));
        resultsList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        resultsList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                resultsListValueChanged(evt);
            }
        });
        resultsScrollPane.setViewportView(resultsList);

        conditionsLabel.setText("Conditions:");

        conditionsScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

        conditionsList.setBackground(new java.awt.Color(240, 240, 240));
        conditionsList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        conditionsScrollPane.setViewportView(conditionsList);

        addButton.setText("Add to (" + destX + "," + destY + "," + destZ+")");
        addButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addButtonActionPerformed(evt);
            }
        });

        limitedUsesCheckBox.setText("Limited Uses");
        limitedUsesCheckBox.setEnabled(false);
        limitedUsesCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                limitedUsesCheckBoxActionPerformed(evt);
            }
        });

        usesField.setText("0");
        usesField.setEnabled(false);

        lightSourceBox.setText("Light Source");
        lightSourceBox.setEnabled(false);

        visibleBox.setText("Visible");
        visibleBox.setEnabled(false);

        usesLabel.setText("Uses:");
        usesLabel.setEnabled(false);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(itemListPane, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(idBox, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(idLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(nameLabel)
                                    .addComponent(nameBox, javax.swing.GroupLayout.DEFAULT_SIZE, 389, Short.MAX_VALUE)))
                            .addComponent(triggerNameLabel)
                            .addComponent(triggeredNameBox, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)
                            .addComponent(descriptionLabel)
                            .addComponent(separator, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(descriptionScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(21, 21, 21)
                                        .addComponent(usesLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(usesField, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(lightSourceBox)
                                    .addComponent(visibleBox)
                                    .addComponent(limitedUsesCheckBox)))
                            .addComponent(resultsLabel)
                            .addComponent(conditionsLabel)
                            .addComponent(resultsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)
                            .addComponent(conditionsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(closeButton)
                        .addGap(0, 0, 0)
                        .addComponent(addButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(itemListPane, javax.swing.GroupLayout.DEFAULT_SIZE, 554, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(nameLabel)
                            .addComponent(idLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(nameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(idBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(triggerNameLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(triggeredNameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(descriptionLabel)
                        .addGap(7, 7, 7)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lightSourceBox)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(visibleBox)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(limitedUsesCheckBox)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(usesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(usesLabel)))
                            .addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(separator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(resultsLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(resultsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(conditionsLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(conditionsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(closeButton)
                            .addComponent(addButton))))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void triggerListTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_triggerListTableMouseClicked
        int row = triggerListTable.getSelectedRow();

        if (row > -1) {
            if (triggerListTable.getModel().getValueAt(row, 0) != null) {
                int id = Integer.parseInt(triggerListTable.getModel().getValueAt(row, 0).toString());
                getTriggerData(id);
            }
        }
    }//GEN-LAST:event_triggerListTableMouseClicked

    private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
        dispose();
    }//GEN-LAST:event_closeButtonActionPerformed

    private void resultsListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_resultsListValueChanged
        getConditionData(resultsList.getSelectedIndex());
    }//GEN-LAST:event_resultsListValueChanged

    private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed
        addTrigger();
}//GEN-LAST:event_addButtonActionPerformed

    private void limitedUsesCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_limitedUsesCheckBoxActionPerformed
        if (limitedUsesCheckBox.isSelected()) {
            usesField.setText("0");
            usesField.setEnabled(true);
        } else {
            usesField.setText("0");
            usesField.setEnabled(false);
        }
}//GEN-LAST:event_limitedUsesCheckBoxActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addButton;
    private javax.swing.JButton closeButton;
    private javax.swing.JLabel conditionsLabel;
    private javax.swing.JList conditionsList;
    private javax.swing.JScrollPane conditionsScrollPane;
    private javax.swing.JTextPane descriptionBox;
    private javax.swing.JLabel descriptionLabel;
    private javax.swing.JScrollPane descriptionScrollPane;
    private javax.swing.JFormattedTextField idBox;
    private javax.swing.JLabel idLabel;
    private javax.swing.JScrollPane itemListPane;
    private javax.swing.JList jList1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JCheckBox lightSourceBox;
    private javax.swing.JCheckBox limitedUsesCheckBox;
    private javax.swing.JFormattedTextField nameBox;
    private javax.swing.JLabel nameLabel;
    private javax.swing.JLabel resultsLabel;
    private javax.swing.JList resultsList;
    private javax.swing.JScrollPane resultsScrollPane;
    private javax.swing.JSeparator separator;
    private javax.swing.JTable triggerListTable;
    private javax.swing.JLabel triggerNameLabel;
    private javax.swing.JFormattedTextField triggeredNameBox;
    private javax.swing.JFormattedTextField usesField;
    private javax.swing.JLabel usesLabel;
    private javax.swing.JCheckBox visibleBox;
    // End of variables declaration//GEN-END:variables
}
